package com.wing.bill.model.enums;

import lombok.Getter;

@Getter
public enum OrderSourceEnum {
    CUSTOMER(1, "客户端"),
//    PLATFORM(2,"平台端"),
    PLATFORM(2,"后台添加"),
//    Manage(2,"后台添加"),
    ;


    private final Integer code;
    private final String desc;

    OrderSourceEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDescByCode(Integer source) {
        for (OrderSourceEnum value : OrderSourceEnum.values()) {
            if (value.code.equals(source)) {
                return value.desc;
            }
        }
        return null;
    }
}
